<table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_grid_top_table" >
  <tr>
    <td>
      <div class="metallic_grid_title">Images</div>
    </td>
  </tr>
    <tr>
        <td class="metallic_paginator">
            <form action="admin/modules/tangra_cms/image/images.php" method="get">
            <table border="0" cellspacing="0" cellpadding="4">
                <tr>
                    <td valign="middle"><strong>Filter</strong>&nbsp;&nbsp;&nbsp;
                    </td>
                    <td>
                        <table border="0" cellspacing="0" cellpadding="4" align="left">
                            <tr>
                                <td>File name like:</td>
                                <td><input name="filename" type="text" size="45" maxlength="255" value="{$filename}"/>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>Note or alt like:</td>
                                <td><input name="notealt" type="text" size="45" maxlength="255" value="{$notealt}"/>&nbsp;&nbsp;</td>                                    
                            </tr>
                        </table>                        
                    </td>
                    <td valign="middle"><input name="submit_filter" type="submit" value="filter" /></td>
                </tr>
            </table>
            <input type="hidden" name="ci" value="{$ci_id}" />
            </form>
        </td>
    </tr>        
  
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
        <tr>
          <td width="34%"> {if $images_total_pages > 1}
            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
              <tr>
                <td valign="middle">{if $images_first_page}<a href="{$images_first_page}" onclick="submit_ajax_grid_images({$images_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                <td valign="middle">{if $images_prev_page}<a href="{$images_prev_page}" onclick="submit_ajax_grid_images({$images_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                <td class="metallic_pg_page_of" valign="middle">{if $images_total_pages}Page {$images_current_page} of {$images_total_pages}{/if}</td>
                <td valign="middle">{if $images_next_page}<a href="{$images_next_page}" onclick="submit_ajax_grid_images({$images_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                <td valign="middle">{if $images_last_page}<a href="{$images_last_page}" onclick="submit_ajax_grid_images({$images_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
              </tr>
            </table>
            {/if} </td>
          <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $images_records_to} Records {$images_records_from}-{$images_records_to} of {$images_records_total}{/if}</td>
          <td class="metallic_pg_records" width="33%" align="right"> {if $images_total_pages > 1}
            <table border="0" cellspacing="2" cellpadding="0">
              <tr>
                <td>Jump to page</td>
                <td>
                  <form class="metallic_pg_page_select" action="{$images_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>
                          <select name="images_grid_page" id="images_field_page" onchange="images_page_change(this.options[this.selectedIndex].value); return false;">
                            
                            
                              
															{foreach from=$images_jump_to_page_arr item=images_page_num}
															
                              
                            
                            <option value="{$images_page_num}"{if $images_page_num == $images_current_page} selected="selected"{/if}>{$images_page_num}</option>
                            
                            
                              
															{/foreach}
														
                            
                          
                          </select>
                        </td>
                        <td>
                          <noscript>
                          &nbsp;
                          <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                          </noscript>
                        </td>
                      </tr>
                    </table>
                  </form>
                </td>
              </tr>
            </table>
            {else}
            &nbsp;
            {/if} </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="1" cellpadding="2" class="metallic_grid_table">
        <tbody>
        
        {section name=images loop=$images_prows step=3}
        <tr class="metallic_grid_body">
          <td align="left" width="280">
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$smarty.section.images.index].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$smarty.section.images.index].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>Original name</strong>:<br />
                              {$images_prows[$smarty.section.images.index].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$images_prows[$smarty.section.images.index].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$images_prows[$smarty.section.images.index].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$images_prows[$smarty.section.images.index].cols.3} x {$images_prows[$smarty.section.images.index].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_edit.php?image_obj_id={$images_prows[$smarty.section.images.index].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/edit.png"  width="16" height="16" border="0" {popup text="Edit note and alt" }/></a></td>
                                    <td>&nbsp;</td>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_delete.php?delete={$images_prows[$smarty.section.images.index].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/delete.png"  width="16" height="16" border="0"  {popup text="Delete this image" }/></a></td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $images_prows[$smarty.section.images.index].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$images_prows[$smarty.section.images.index].cols.7`"}>{$images_prows[$smarty.section.images.index].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $images_prows[$smarty.section.images.index].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$images_prows[$smarty.section.images.index].cols.6`"}>{$images_prows[$smarty.section.images.index].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          </td>
          <td align="left" width="280">
            {math equation="next + 1" next=$smarty.section.images.index assign=index_next_next}                        
            {if $images_prows[$index_next_next].cols.0}            
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$index_next_next].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$index_next_next].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>Original name</strong>:<br />
                              {$images_prows[$index_next_next].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$images_prows[$index_next_next].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$images_prows[$index_next_next].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$images_prows[$index_next_next].cols.3} x {$images_prows[$index_next_next].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_edit.php?image_obj_id={$images_prows[$index_next_next].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/edit.png"  width="16" height="16" border="0" {popup text="Edit note and alt" }/></a></td>
                                    <td>&nbsp;</td>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_delete.php?delete={$images_prows[$index_next_next].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/delete.png"  width="16" height="16" border="0"  {popup text="Delete this image" }/></a></td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $images_prows[$index_next_next].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$images_prows[$index_next_next].cols.7`"}>{$images_prows[$index_next_next].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $images_prows[$index_next_next].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$images_prows[$index_next_next].cols.6`"}>{$images_prows[$index_next_next].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          {else}
          &nbsp;
          {/if}
          </td>
          <td align="left" width="280">
	       {math equation="next + 2" next=$smarty.section.images.index assign=index_next_next}          
            {if $images_prows[$index_next_next].cols.0}                       
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$index_next_next].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$images_prows[$index_next_next].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>Original name</strong>:<br />
                              {$images_prows[$index_next_next].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$images_prows[$index_next_next].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$images_prows[$index_next_next].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$images_prows[$index_next_next].cols.3} x {$images_prows[$index_next_next].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_edit.php?image_obj_id={$images_prows[$index_next_next].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/edit.png"  width="16" height="16" border="0" {popup text="Edit note and alt" }/></a></td>
                                    <td>&nbsp;</td>
                                    <td width="16"><a href="admin/modules/tangra_cms/image/image_delete.php?delete={$images_prows[$index_next_next].cols.0}"><img src="/img/modules/crystal_icons_small/16x16/delete.png"  width="16" height="16" border="0"  {popup text="Delete this image" }/></a></td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $images_prows[$index_next_next].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$images_prows[$index_next_next].cols.7`"}>{$images_prows[$index_next_next].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $images_prows[$index_next_next].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$images_prows[$index_next_next].cols.6`"}>{$images_prows[$index_next_next].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          {else}
          &nbsp;
          {/if}
          </td>
        </tr>
        {sectionelse}
        <tr>
        	<td class="metallic_grid_body" style="height:100px;">No images</td>
        </tr>
        {/section}
        <!-- Following can be used to pad with empty rows to desired table row count. Replace 25 with desired value
				{math equation="$images_page_size - rc" rc=$images_prows_count assign=rc}
				{section name=aa loop=$rc}
				<tr class="metallic_grid_body">
                    <td colspan="1">&nbsp;</td>
									</tr>
				{/section}
 -->
        </tbody>
        
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
        <tr>
          <td width="34%"> {if $images_total_pages > 1}
            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
              <tr>
                <td valign="middle">{if $images_first_page}<a href="{$images_first_page}" onclick="submit_ajax_grid_images({$images_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                <td valign="middle">{if $images_prev_page}<a href="{$images_prev_page}" onclick="submit_ajax_grid_images({$images_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                <td class="metallic_pg_page_of" valign="middle">{if $images_total_pages}Page {$images_current_page} of {$images_total_pages}{/if}</td>
                <td valign="middle">{if $images_next_page}<a href="{$images_next_page}" onclick="submit_ajax_grid_images({$images_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                <td valign="middle">{if $images_last_page}<a href="{$images_last_page}" onclick="submit_ajax_grid_images({$images_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
              </tr>
            </table>
            {/if} </td>
          <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $images_records_to} Records {$images_records_from}-{$images_records_to} of {$images_records_total}{/if}</td>
          <td class="metallic_pg_records" width="33%" align="right"> {if $images_total_pages > 1}
            <table border="0" cellspacing="2" cellpadding="0">
              <tr>
                <td>Jump to page</td>
                <td>
                  <form action="{$images_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>
                          <select name="images_grid_page" id="images_field_page" onchange="images_page_change(this.options[this.selectedIndex].value); return false;">
                            
                            
                              
															{foreach from=$images_jump_to_page_arr item=images_page_num}
															
                              
                            
                            <option value="{$images_page_num}"{if $images_page_num == $images_current_page} selected="selected"{/if}>{$images_page_num}</option>
                            
                            
                              
															{/foreach}
														
                            
                          
                          </select>
                        </td>
                        <td>
                          <noscript>
                          &nbsp;
                          <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                          </noscript>
                        </td>
                      </tr>
                    </table>
                  </form>
                </td>
              </tr>
            </table>
            {else}
            &nbsp;
            {/if} </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
